<?php 
class Story_Widget_StoryCategoriesController extends Engine_Content_Widget_Abstract
{
	public function indexAction()
	{	 
		$this->view->categories = $categories = Engine_Api::_()->getItemTable('story_category')->getChildrenOfParent(Story_Model_Category::COMICS);
		
		if( Engine_Api::_()->core()->hasSubject() ) {
			$story = Engine_Api::_()->core()->getSubject();
			if($story->canView(Story_Model_Category::STORY_THREAD)){
				return $this->setNoRender();
			}
		}
	}
}
